<template>
  <div class="common-layout">
    <el-container>
      <el-header style="padding: 0px">
        <banner/>
      </el-header>
      <el-container>
        <el-aside width="300px">
          <navigation @choose="show"/>
        </el-aside>
        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import {onMounted} from "vue"
import banner from '@/views/banner.vue'
import navigation from '@/views/navigation.vue'
import { useRouter } from 'vue-router'
import {useStore} from 'vuex'

let router = useRouter()
let store = useStore()

let show = (n: any) => {
  store.state.node = n.name
  router.push(n.path)
}
onMounted(() => {
  router.push('/')
})
</script>

<style>
@import '@/assets/common.css';

.content-card {
  background-color: #f5f5f5;
}
.menu-title {
  margin-top: 30px;
  margin-left: 40px;
  width: 100%;
  height: 60px;
  line-height: 40px;
  text-align: left;
  font-size: 20px;
}
</style>
